<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>修改课题信息</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="<%=basePath%>/layui/css/layui.css" media="all">
  <script src="<%=basePath%>/js/jquery-3.2.1.min.js"></script>
</head>
<body>
<form class="layui-form" id ="form">
	<div class="layui-form-item" style="margin-top:50px;">
		 <input class="layui-input" id="sbjId" style="display:none">
	    <div class="layui-form-item">
		    <label class="layui-form-label">毕业设计题目名称：</label>
		    <div class="layui-input-inline">
			    <input class="layui-input" style="width:300px;" type = "text" id="sbjName" lay-verify="required" lay-reqtext="账号是必填项！">
			</div>
		</div>
	    <div class="layui-form-item">
		    <label class="layui-form-label">毕业设计内容简介：</label>
		    <div class="layui-input-inline">
			     <textarea class="layui-textarea"  style="width:600px;height:300px" id="sbjContent"></textarea>
			</div>
		</div>
		<div class="layui-form-item">
		    <label class="layui-form-label">类型：</label>
		    <div class="layui-input-inline">
			    <input  class="layui-input" style="width:300px;" type = "text" id="sbjType">
			</div>
		</div>
		<div class="layui-form-item">
		    <label class="layui-form-label">适合专业：</label>
		    <div class="layui-input-inline">
			    <input  class="layui-input" style="width:300px;" type = "text" id="sbjMajor">
			</div>
		</div>
 	 </div>
</form>
</body>


<script src="<%=basePath%>/js/vue.min.js"></script>
<script src="<%=basePath%>/layui/layui.js" charset="utf-8"></script>
<script>
layui.use('form',function(){
	var form = layui.form;
	$('#sbjId').val(localStorage.getItem("sbjId"));
	$('#sbjName').val(localStorage.getItem("sbjName"));
	$('#sbjContent').val(localStorage.getItem("sbjContent"));
	$('#sbjType').val(localStorage.getItem("sbjType"));
	$('#sbjMajor').val(localStorage.getItem("sbjMajor"));
	
	//全部更新 解决单选框不渲染
	form.render();
});

</script>
</html>